class Solution:
    def firstMissingPositive(self, nums: list[int]) -> int:
        flag = set()
        for it in nums:
            flag.add(it)

        for i in range(1, 2147483649):
            if i not in flag:
                return i
